package gis.lifay.sdk;

import gis.lifay.sdk.geoserver.DealProcessStream;

import java.io.InputStream;

/**
 *@ClassName ExecTest
 *@Description TODO
 *@Author lifay
 *@Date 2021/11/2 23:22
 **/
public class ExecTest {

    public void draw() {


        //调用bat脚本进行图像处理

        Process process = null;
        InputStream in = null;
        try {
            process = Runtime.getRuntime().exec("startup.bat");

            new DealProcessStream(process.getInputStream()).start();
            new DealProcessStream(process.getErrorStream()).start();


            process.waitFor();

        } catch (Exception e) {

        } finally {
            process.destroy();
        }
    }
}




